from model.base import Base
from sqlalchemy import String, Integer, Float
from sqlalchemy.orm import mapped_column, Mapped


class Task(Base):
    """任务"""

    __tablename__ = 'task'

    # ID编号
    id: Mapped[int] = mapped_column(primary_key=True)
    # 名称
    name: Mapped[str] = mapped_column(String(30))
    # 成功数量
    success: Mapped[int] = mapped_column(Integer)
    # 总数
    total: Mapped[int] = mapped_column(Integer)
    # 成功率
    rate: Mapped[float] = mapped_column(Float)